<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script>
    <script type="text/javascript" src="../../src/objx.test.js"></script>
    <script type="text/javascript" src="../../src/objx.js"></script>
    <script type="text/javascript">

                
        function test_st()
        {
        
            // st 'stamps' true or a value to objx.k where k is the key
            // this is useful for quickly and simply 'marking' objects with
            // objx specific information.
        
            var o = {};
            objx.st("a", o);
            assertNotUndefined(o.objx);
            assertTrue(o.objx.a);
        
            var o2 = {};
            objx.st("a", o2, 123);
            assertNotUndefined(o2.objx);
            assertEquals(123, o2.objx.a);
            
            // make sure the output of the 'st' function is the
            // modified object itself
            assertEquals("The return of st() is expected to be the modified object itself.", o2, objx.st("b", o2));
        
        }

        function test_abstract()
        {
        
            var o = {};
            
            objx.abstract(o);
            
            assertTrue(o.objx.ab);
            
            
            var MyClass = Class({});
            
            objx.abstract(MyClass);
            
            assertTrue(MyClass.objx.ab);
        
        }
        
    </script>
</head>
<body>
</body>
</html>